<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../js/Validate.js"></script>
<link href="../../css/theme0.css" rel="stylesheet" type="text/css" />
<title>输入部门信息</title>
</head>
<body>
<div class="table">
    <img src="images/bg-th-left.gif" width="8" height="7" alt="" class="left" />
    <img src="images/bg-th-right.gif" width="7" height="7" alt="" class="right" />
    <table class="listing form" cellpadding="0" cellspacing="0">
        <tr>
            <th class="full" colspan="2">部门信息</th>
        </tr>
        <tr>
            <td class="first" width="172"><strong>部门名称</strong></td>
            <td class="last">
                <input id="DeptName" class="text" type="text" name="dept.departmentName" maxlength="10" value="${ dept.departmentName }" onblur="hideRequired(this.value, 'DeptNameRequired');"/>
                <span id="DeptNameRequired"></span>
            </td>
        </tr>
        <tr class="bg">
            <td class="first"><strong>部门人数</strong></td>
            <td class="last">
                <input id="DeptCapacity" class="text" type="text" name="dept.capacity" maxlength="3" value="${ dept.capacity }" onblur="hideRequired(this.value, 'DeptCapacityRequired');" onkeydown="onlyNumber();"/>
                <span id="DeptCapacityRequired"></span>
            </td>
        </tr>
        <tr>
            <td class="first""><strong>部门经理</strong></td>
            <td class="last">
                <select id="DeptManagerId" name="dept.managerId">
				    <c:forEach var="human" items="${ humans }">
				        <c:choose>
				            <c:when test="${ human.humanId == dept.managerId }">
				                <option selected="selected" value="${ human.humanId }">${ human.humanName }</option>
				            </c:when>
				            <c:otherwise>
				                <option value="${ human.humanId }">${ human.humanName }</option>
				            </c:otherwise>
				        </c:choose>
				    </c:forEach>
				</select>
            </td>
        </tr>
        <tr class="bg">
            <td class="first"><strong>备注</strong></td>
            <td class="last">
                <textarea id="DeptRemark" name="dept.remark" rows="5" cols="50">${ dept.remark }</textarea>
            </td>
        </tr>
    </table>
	<input type="hidden" name="dept.departmentId" value="${ dept.departmentId }" />
    <input id="Submit" class="button" type="submit" value="提交" />
    <input id="Reset" class="button" type="reset" value="重置" />
</div>
</body>
</html>